<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<style>
			.imga{
				animation: dfc .8s linear infinite;
			}
			@keyframes dfc{
				0%{
					transform: rotate(180deg);
				}
				30%{
					transform: rotate(360deg);
				}
				100%{
					transform: rotate(720deg);
				}
			}
			.imgb{
				animation: dfc1 .8s linear infinite;
			}
			@keyframes dfc1{
				0%{
					transform: rotateY(180deg) scale(1);
				}
				30%{
					transform: rotateY(360deg) scale(1.2);
				}
				100%{
					transform: rotateY(720deg) scale(1.4);
				}
			}
		</style>
	</head>
	<script src="../js/jquery-1.11.1.js"></script>
	<body>
		<img src="../img/01.gif" alt="1" />
		<audio src="../img/dafengche.mp3" autoplay></audio>
		<button id="btn1">开转</button>
		<button id="btn2">停止转</button>
		<button id="btn3">翻转</button>
		<script>
			$("#btn1").click(function(){
				//元素  上属性  | 元素可以加类名
				$("img").attr("src","../dfc.jpg").addClass("imga");
			});
			//暂停
			$("#btn2").click(function(){
				$("img").attr("src","../dfc.jpg").removeClass("imga");
			});
			//翻转
			$("#btn3").click(function(){
            $("img").attr("src","../dfc.jpg").toggleClass("imgb");
			});
			//去音乐
			$("audio").removeAttr("src");
		</script>
	</body>
</html>